//
//  TableViewCellOfContact.m
//  王宇先_14_自定义Cell侧滑删除_StoryBoard 应用
//
//  Created by wyx on 16/3/28.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "TableViewCellOfContact.h"
#import "MyScrollView.h"
@interface TableViewCellOfContact () <ScorllOfContactDelegate>

@end
@implementation TableViewCellOfContact
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self config];
    }
    return self;
}
#pragma mark - 配置
-(void)config {
    self.contentView.backgroundColor = [UIColor whiteColor];
    MyScrollView *scroll = [[MyScrollView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, self.frame.size.height)];
    scroll.delegate1 = self;
    [self.contentView addSubview:scroll];
    
}
#pragma mark - 协议方法.
- (void)buttonDidTouched {
    if ([self.delegate1 respondsToSelector:@selector(scrollButtonDidTouched:)]) {
        [self.delegate1 scrollButtonDidTouched:self];
    }
}
@end
